/**
 * 获取起草文稿-》材料征集详情mixins
 */
import {getOpinion} from "@/api/opinion";
import {getfileinfopage} from "@/api/system"
import {getNotNull,dealStartEndDate,getFileTypeFiles} from '@/views/util'
import {REVIEW_DIC} from '@/const/dict'
export default function () {
  return {
    data() {
      return {
        opinionDetailData:[],
      }
    },
    methods: {
      getDetailData_opinion(id) {
        getOpinion(id).then(async response => {
          var records = response.data.data
          let files = await getFileTypeFiles(records.fileIds)
          this.opinionDetailData = [
            {label: '征求主题', value: getNotNull(records.title)},
            {label: '发起部门', value: getNotNull(records.deptName)},
            {label: '截止日期', value: getNotNull(records.endDate)},
            {label: '征求说明', value: getNotNull(records.content)},
            {label: '创建时间', value: getNotNull(records.createTime)},
            {label: '创建人', value: getNotNull(records.createNickname)},
            {label: '附件', files:files},
          ]
        })
      },
    }
  }
}
